{extend name="public/layout"}
{block name="title"}珊瑚{/block}
{block name="head"}
<style>
    body, html {
        height: 100%;
        background-color: #50d1ff;
    }

    #main-img {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
    }

    .footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0.13440000000000002rem;
        text-align: center;
        z-index: 1;
    }

    .footer img {
        height: 0.3936rem;
    }

    .footer label {
        font-size: 0.23040000000000002rem;
        color: white;
        display: block;
        text-align: center;
        line-height: 0.23040000000000002rem;
    }


    .avatar {
        top: 1.0752000000000002rem;
        right: 0;
        position: fixed;
        width: 2.496rem;
        background-color: rgba(0, 116, 158, 0.19);
        border-top-left-radius: 0.384rem;
        border-bottom-left-radius: 0.384rem;
        height: 0.768rem;
    }

    .avatar img {
        height: 0.6144rem;
        width: 0.6144rem;
        border-radius: 50%;
        margin-top: 0.07680000000000003rem;
        margin-left: 0.07680000000000003rem;
        margin-right: 0.07680000000000003rem;
    }

    .avatar .username {
        font-size: 0.23040000000000002rem;
        color: white;
    }
    .line-bar{
        height:0.2112rem;
        width:1.6128rem;
        margin-top: 2px;
        background: url("/images/icons/line-bar.png") no-repeat left center;
        -webkit-background-size:100% 100%;
        background-size:100% 100%;
        position: relative;
        overflow: hidden;

        padding: 0.02rem;
    }

    .line-text{
        font-size:0.1056rem;
        line-height: 1em;
        position: absolute;
        right:0.1rem;
        top:50%;
        margin-top:-0.0528rem;
        -webkit-text-size-adjust:none;
        color:#0d8500;
    }

    #fishes{
        transform: perspective(1000);
        -moz-transform: perspective(1000);
        -o-transform: perspective(1000);
        -webkit-transform: perspective(1000);
        position: fixed;
        left:0;
        right:0;
        bottom:0;
        top:0;
        z-index:0;
    }

    .fish{
        width:1.0368rem;
        position: absolute;
        left:80%;
        bottom:200px;
    }
    .a1{
        -webkit-animation:f1 20s infinite normal;
        animation:f1 20s infinite normal;
        /*animation-timing-function:cubic-bezier(.37,.62,.61,-0.09);*/
        /*-webkit-animation-timing-function:cubic-bezier(.37,.62,.61,-0.09); !* Safari 和 Chrome *!*/
    }
    .a2 {
        -webkit-animation: f2 30s infinite normal;
        animation: f2 30s infinite normal;
    }
    .a3 {
        -webkit-animation: f3 20s infinite normal;
        animation: f3 20s infinite normal;
    }
    @-webkit-keyframes f1{
        from{
            left:100%;
            bottom:200px;
            -webkit-transition-property: left, bottom;
            transition-property: left, bottom;
        }
        20%{
            left:80%;
            bottom:200px;
        }

        50%{
            left:50%;
            bottom:180px;
            animation-delay: 1s;
        }

        60%{
            left:30%;
            bottom:180px;

            animation-delay: 1s;
        }
        69.99%{
            -webkit-transform: rotateY(0deg);
            transform: rotateY(0deg);
        }
        70%{
            left:10%;
            bottom:180px;
            -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
            animation-delay: 1s;

        }

        to{
            -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
            left:100%;
            bottom:150px;
        }
    }
    @keyframes f1{
        from{
            left:100%;
            bottom:200px;
            -webkit-transition-property: left, bottom;
            transition-property: left, bottom;
        }
        20%{
            left:80%;
            bottom:200px;
        }

        50%{
            left:50%;
            bottom:180px;
            animation-delay: 1s;
        }

        60%{
            left:30%;
            bottom:180px;

            animation-delay: 1s;
        }
        69.99%{
            -webkit-transform: rotateY(0deg);
            transform: rotateY(0deg);
        }
        70%{
            left:10%;
            bottom:180px;
            -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
            animation-delay: 1s;

        }

        to{
            -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
            left:100%;
            bottom:150px;
        }
    }



    @-webkit-keyframes f2{

    }
    @keyframes f2{
        from{
            left:-2rem;
            bottom:300px;
            -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
        }
        20%{
            left:30%;
            bottom:280px;
        }

        50%{
            left:100%;
            bottom:220px;
            animation-delay: 1s;
            -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
        }
        51%{
            -webkit-transform: rotateY(0deg);
            transform: rotateY(0deg);
        }

        60%{
            left:70%;
            bottom:200px;
            animation-delay: 1s;
        }

        70%{
            left:50%;
            bottom:180px;
            animation-delay: 1s;
        }

        to{
            left:-2rem;
            bottom:200px;
        }
    }
 @-webkit-keyframes f3{

    }

    @keyframes f3{
        from{
            left:-2rem;
            bottom:100px;
            -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
        }
        20%{
            left:30%;
            bottom:120px;
        }

        50%{
            left:100%;
            bottom:100px;
            animation-delay: 1s;
            -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
        }
        51%{
            -webkit-transform: rotateY(0deg);
            transform: rotateY(0deg);
        }

        60%{
            left:70%;
            bottom:100px;
            animation-delay: 1s;
        }

        70%{
            left:50%;
            bottom:120px;
            animation-delay: 1s;
        }

        to{
            left:-2rem;
            bottom:80px;
        }
    }



    .line-progress{
        height:100%;
        background-color: #7cda28;
        border-bottom-left-radius: 0.1056rem;
        border-top-left-radius: 0.1056rem;
        {if $weight/$maxWeight egt 1}
        border-bottom-right-radius: 0.1056rem;
        border-top-right-radius: 0.1056rem;
        {/if}
    }
</style>
{/block}
{block name="content"}
<img src="/images/status/bg{$status}.png" alt="" id="main-img">
<div class="footer">
    <div class="flex">
        <div class="flex-con">
            <a href="{:U('album/index')}">
                <img src="/images/icons/pic3.png" alt="">
                <label>
                    相册
                </label>
            </a>
        </div>
        <div class="flex-con">
            <a href="{:U('video/index')}">
                <img src="/images/icons/video3.png" alt="">
                <label>
                    视频
                </label>
            </a>
        </div>
        <div class="flex-con">
            <a href="{:U('ranklist')}">
                <img src="/images/icons/rank3.png" alt="">
                <label>
                    排行榜
                </label>
            </a>
        </div>
        <div class="flex-con">
            <a href="{:U('help')}">
                <img src="/images/icons/help3.png" alt="">
                <label>
                    帮助
                </label>
            </a>
        </div>
    </div>
</div>

<div class="avatar">
    <div class="flex">
        <div>
            <img src="{$info.avatar}" alt="" class="">
        </div>
        <div class="flex-con">
            <div class="username">
                {$info.nickname}
            </div>
            <div class="line-bar">
                <div class="line-text">
                    {$weight*1000}g/{$maxWeight*1000}g
                </div>
                <div class="line-progress" style="width:{$weight/$maxWeight*100}%">

                </div>
            </div>
        </div>
    </div>
</div>
{if $status gt 4}
<div id="fishes"></div>
<script src="/js/fish.js"></script>
<script>
    {if $status gt 5}
    Fish.create();
    Fish.create();
    Fish.create();
    {/if}
</script>
{/if}
{/block}


